<?php

//use Illuminate\Support\Facades\Schema;
use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopSitesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_sites', function (Blueprint $table) {
            $table->comment = '地址管理表';
            $table->increments('id')->comment('地址ID');
			$table->integer('user_id')->comment('用户ID');
            $table->string('name',50)->default('')->comment('收货人');
            $table->string('phone',30)->default('')->comment('手机号码');
            $table->integer('province_id')->comment('省ID');
			$table->string('province_name',100)->default('')->comment('省名称');
            $table->integer('city_id')->comment('市ID');
			$table->string('city_name',100)->default('')->comment('市名称');
            $table->integer('county_id')->comment('区/县ID');
			$table->string('county_name',100)->default('')->comment('区/县名称');
			$table->string('detailed_address',100)->default('')->comment('收货地址');
            $table->tinyInteger('status')->default(1)->comment('是否默认：1=是 0=否');
            $table->tinyInteger('is_delete')->default(0)->comment('是否删除：1=是 0=否');
            $table->timestamp('created_at')->nullable()->comment('创建时间');
			$table->timestamp('updated_at')->nullable()->comment('更新时间'); 
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_sites');
    }
}
